package thread;

public class ThreadDemo1
{
    public static void main(String[] args)
    {
        Thread t1 = new one();
        Thread t2 = new two();
        t1.start();
        t2.start();
    }
}
// https://gitee.com/xiloer/jsd2412-se-teacher.git

class one extends Thread
{
    @Override
    public void run()
    {
        Thread.currentThread().setName("one");
        for (int i = 0 ; i < 1000 ; i++)
        {
            System.out.println("i = " + i + "   " + Thread.currentThread().getName());
        }
    }
}


class two extends Thread
{
    @Override
    public void run()
    {
        Thread.currentThread().setName("two");
        for (int i = 0 ; i < 1000 ; i++)
        {
            System.out.println("i = " + i + "   " + Thread.currentThread().getName());
        }
    }
}
